package com.yan.demo.arrydemo;

import java.util.Scanner;

public class ArrayTest5 {
    public static void main(String[] args) {
        int[] arr = {72, 89, 65, 87, 91, 82, 71, 93, 76, 68};
        double sum = 0;
        for (int i = 0; i < arr.length; i++) {
            sum = sum + arr[i];
        }
        double avg = sum / arr.length;
        System.out.println("avg = " + avg);
        System.out.println("sum = " + sum);
        int count = 0;
        for (int i = 1; i < arr.length; i += 2) {
            sum = arr[i];
            count++;
        }
    }
}
